package io.github.talelin.latticy.mapper.oms;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.github.talelin.latticy.common.mybatis.Page;
import io.github.talelin.latticy.dto.order.PageListDTO;
import io.github.talelin.latticy.dto.order.TakeDownPageListDTO;
import io.github.talelin.latticy.model.oms.OrderDO;
import io.github.talelin.latticy.vo.oms.OrderDetailVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author generator@wulongbo
 * @since 2022-06-28
 */
public interface OrderMapper extends BaseMapper<OrderDO> {

    int deleteCancelOrderByOrderId(@Param("orderNo") Long orderNo);

    OrderDetailVO getOrderDetailVOByOrderId(@Param("orderNo") Long orderNo);


    /**
     * 分页查询
     * @param page
     * @param pageListDTO
     */
    IPage<OrderDetailVO> takeDownPageList(Page page, @Param("params") TakeDownPageListDTO pageListDTO);


    /**
     * 分页查询
     * @param page
     * @param pageListDTO
     * @return
     */
    IPage<OrderDetailVO> pageList(Page page,@Param("params")  PageListDTO pageListDTO);


    Map<String,Long> findItemPickingType();

    /**
     * 根据ids查询
     * @param orderOns
     * @return
     */
    List<OrderDetailVO> selectByIds(@Param("orderOns") List<Long> orderOns);
}
